<script>on mouseUpif the value of the clickLine is not empty thenselect the clickLinelock screenput the value of the clickLine into goChapterplay flute Cgo cd goChapterunlock screen with visual effect wipe rightend ifend mouseUp</script>
</part>
<part>
<id>4</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <true /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>0</left>
<top>19</top>
<right>512</right>
<bottom>54</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Helvetica</font>
<textSize>20</textSize>
<textStyle>outline</textStyle>
<textStyle>italic</textStyle>
<textStyle>bold</textStyle>
<textHeight>26</textHeight>
<name>Book Title</name>
<script>on mouseUpput me into oldTitleask "Enter your title:" with oldTitleif it is empty thenput "Click Here To Enter Title" into meexit mouseUpend ifput it into newTitleif number of chars of newTitle > 31 thenanswer "No more than 31 characters permitted!"exit mouseUpend ifput newTitle into meend mouseUp</script>
</part>
<part>
<id>5</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>15</left>
<top>73</top>
<right>65</right>
<bottom>88</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<name>Add</name>
<script>on mouseUpplay "harpsichord" "e"global newChapteranswer "Add recipe or chapter?" with "Chapter" or "Recipe" or "Abort"if it is "Chapter" thenask "Enter the chapter:"if it is empty then exit mouseUpif number of chars of it > 31 thenanswer "No more than 31 characters permitted!"exit mouseUpend ifif first char of it is a number thenanswer "First character must be a letter!"exit mouseUpend ifif it is not empty thenset cursor to watchput it into newChapterrepeat with x = 1 to number of lines of bg fld "Table of Contents"if line x of bg fld "Table of Contents" is newChapter thenanswer "A chapter" && newChapter && "already exists!"exit mouseUpend ifend repeatif bg fld "Table of Contents" is empty thenput newChapter into bg fld "Table of Contents"createChapterCardexit mouseUpend ifif bg fld "Table of Contents" is not empty thenrepeatif last char of bg fld "Table of Contents" is return then ¬delete last char of bg fld "Table of Contents"if last char of bg fld "Table of Contents" is not return ¬then exit repeatend repeatput return & newChapter after bg fld "Table of Contents"createChapterCardend ifend ifend ifif it is "Recipe" thenif bg fld "Table of Contents" is empty thenanswer "No chapters yet!"exit mouseUpend ifif bg fld "Table of Contents" is not empty thenput bg fld "Table of Contents" into bg fld "Table of Contents" ¬of cd "Add Recipe"lock screengo cd "Add Recipe"end ifend ifend mouseUpon createChapterCardglobal newChapterlock screengo cd "Chapter"doMenu "New Card"set the name of this card to newChapterput newChapter into bg fld "Chapter"go cd "Table of Contents"end createChapterCard</script>
</part>
<part>
<id>6</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>15</left>
<top>92</top>
<right>65</right>
<bottom>107</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<name>Delete</name>
<script>on mouseUpplay "harpsichord" "e"answer "Delete chapter or recipe?" with "Chapter" or "Recipe" or "Abort"if it is "Abort" then exit mouseUpif it is "Chapter" then-- answer "You will be deleting a CHAPTER with all of its recipes. Continue?" with ¬-- "Continue" or "Abort"-- if it is "Continue" thenput bg fld "Table of Contents" into bg fld "Table of Contents" of cd "Delete Chapter"lock screengo cd "Delete Chapter"unlock screen-- end ifend ifif it is "Recipe" thenput bg fld "Table of Contents" into bg fld "Table of Contents" of cd "Delete Recipe"lock screengo cd "Delete Recipe"end ifend mouseUp</script>
</part>
<part>
<id>11</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <true /> </dontSearch>
<sharedText> <true /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>188</left>
<top>79</top>
<right>314</right>
<bottom>96</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>outline</textStyle>
<textStyle>bold</textStyle>
<textHeight>12</textHeight>
<name></name>
<script></script>
</part>
<part>
<id>12</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <true /> </dontSearch>
<sharedText> <true /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>128</left>
<top>310</top>
<right>381</right>
<bottom>331</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>9</textSize>
<textStyle>outline</textStyle>
<textStyle>bold</textStyle>
<textHeight>12</textHeight>
<name></name>
<script></script>
</part>
<part>
<id>13</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>80</left>
<top>73</top>
<right>130</right>
<bottom>88</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<name>Arrange</name>
<script>on mouseUpplay "harpsichord" "e"if number of lines of bg fld "Table of Contents" < 2 thenanswer "Not enough chapters to arrange!"exit mouseUpend iflock screenput bg fld "Table of Contents" into bg fld "Table of Contents" of cd "Arrange TOC"go cd "Arrange TOC"end mouseUp</script>
</part>
<part>
<id>17</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>80</left>
<top>92</top>
<right>130</right>
<bottom>107</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>9</textSize>
<textStyle>bold</textStyle>
<name>Sort</name>
<script>on mouseUpplay "harpsichord" "e"if number of lines of bg fld "Table of Contents" > 1 thenanswer "This will take a short while. Are you sure you want your" &&¬"list sorted?" with "Abort" or "Do It"if it is abort then exit mouseupglobal saveListglobal newListput empty into newListput empty into saveListset cursor to watchput bg fld "Table of Contents" into saveListtransferList atransferList btransferList ctransferList dtransferList etransferList ftransferList gtransferList htransferList itransferList jtransferList ktransferList ltransferList mtransferList ntransferList otransferList ptransferList qtransferList rtransferList stransferList ttransferList utransferList vtransferList wtransferList xtransferList ytransferList zlock screenput newList into bg fld "Table of Contents"select first line of bg fld "Table of Contents"unlock screenrepeatif last char of bg fld "Table of Contents" is return then delete last char of bg fld "Table of Contents"if last char of bg fld "Table of Contents" is not return then exit repeatend repeatelse answer "Not enough chapters to sort!"end mouseUpon transferList letterglobal saveListglobal newListrepeat with x = 1 to number of lines of saveListrepeatif last char of newList is return then delete last char of newListif last char of newList is not return then exit repeatend repeatif char 1 of line x of saveList is letter thenput return & line x of saveList after newListend ifend repeatif first line of newList is empty then delete first line of newListend transferList</script>